﻿using System.Collections.Generic;
using System.Windows;
using System.Windows.Media.Imaging;
using System.Xml.Linq;
using AzukiMap.Map;
using AzukiMap.MapSource;
using GeoAPI.Geometries;
using System.IO;
using System.Windows.Controls;
using System.Windows.Media;
using System;

namespace AzukiMap.Layer
{
    public interface ILayer 
    {
        event EventHandler DrawingFinished;
        bool Readable { get; set; }
        bool Writable { get; set; }
        bool IsRendering { get; }
        MapSourceTypes Type { get; }
        MapCoordinate MapCoord { get; }
        IPolygon MaxExtent { get; set; }
        string LayerName { get; set; }
        int ZIndex { get; set; }
        double MaxScale { get; set; }
        double MinScale { get; set; }
        bool IsVisible { get; }
        string IconSrc { set; get; }
        Visibility Visibility { get; set; }
        double Opacity { get; set; }
        BitmapImage DataTypeIcon { get; set; }
        int Srid { get; }
        bool IsDrawable { get; set; }
        Dictionary<int, IList<FrameworkElement>> RenderedElements { get; set; }
        IList<int> IgnoreSrids { get; set; }

        void Draw();
        void Redraw();
        void Clear();
        void Show();
        void Hide();

        FontFamily LabelFont { get; set; }
        Brush LabelBrush { get; set; }
        double LabelSize { get; set; }
        bool LabelNeedsBackground { get; set; }
        Brush LabelBackground { get; set; }

        XElement ToXml();
        void Parse(XElement xmlElement);
        void MapScaleChanged(object sender, MapScaleChangedArgs e);
        void MoveEastWestCanvases();
        void SetCoordTransformation();

    }
}
